﻿using System.ComponentModel;

namespace WordStat.ArticlesService
{
    internal sealed class Record : INotifyPropertyChanged
    {
        private bool _isSelected;
        public bool IsSelected
        {
            get { return _isSelected; }
            set
            {
                _isSelected = value;
                ReportChanged("IsSelected");
            }
        }

        public string ArticleTitle { get; set; }

        public string Author { get; set; }

        public long ArticleId { get; set; }

        public event PropertyChangedEventHandler PropertyChanged;

        private void ReportChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}